﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Threading;
using VCMDL.NET;

namespace VoltGameEditor
{
    public static class Globals
    {
        public static bool isZooming;     // Forward and back movement
        public static bool isPanning;     // Side to Side movement
        public static bool isOrbit;       // Rotate camera endXYZ around   
		public static bool isCenterOrbit; // Orbits around an object
		public static bool isKeyMove;     // Keyboard movement

        public static bool currDocSaved = false;
        public static bool docOpen = false;

        public static float Zoom2DFactor = 2;
        public static sbyte Zoom3DFactor = 24;
        public static sbyte ShiftKeyMultiplier = 2;     //multiplier for moving faster when holding shift
        public static sbyte SpeedMultiplier = 8;		//multiplier for moving 
        public static sbyte moveSpeed = 4;              //units per move to travel

        public static string currDir = Directory.GetCurrentDirectory();
        public const string TAB = "    ";

		public static int MaxOpenDocs = 6;
		public static int NumDocs = 0;
		public static int tabIndex_Sel = 0;
        
        public enum Renderers
        {
            TaoOpenGL,
			SlimDX
        }
		public enum Filtering
		{
			Bilinear,
			Trilinear
		}

        public enum Game
        {
            Quake_1,
            Quake_2,
            Quake_III_Arena,
			NONE
        }
        public enum MapIOTypes
        {
            IO_Import,
            IO_Export,
            IO_Unknown
        }
        public enum DocType
        {
            Map,
            Texture,
            Model,
            Script,
			StartPage
        }
        public enum Bind
        {
            ToggleConsole,
            Help,
            Grid_Up,
            Grid_Down,

            Cam_Pivot,
            Cam_Zoom,
            Move_Forward,
            Move_Back,
            Turn_Right,
            Turn_Left,
            View_Up,
            View_Down,
            Run
		}

		public delegate void GameModeEventHandler(Game Mode, EventArgs e);
		public static event GameModeEventHandler GameModeChanged;
		private static  Game _GameMode = new Game();
		public static Game GameMode
		{
			get { return _GameMode; }
			set
			{
				_GameMode = value;
				onGameModeChanged(_GameMode, EventArgs.Empty);
			}
		}
		static void onGameModeChanged(Game Mode, EventArgs e)
		{
			if (GameModeChanged != null)
				GameModeChanged(GameMode, e);
			functions.AddObjects(Mode);
			functions.SetupGame(Mode);
		}
		
    }
}
